//
//  CAShapeLayer+Extension.h
//  XuedaOnlineSchool
//
//  Created by 学大教育 on 2020/11/7.
//  Copyright © 2020 JackMac. All rights reserved.
//

#import <QuartzCore/QuartzCore.h>

NS_ASSUME_NONNULL_BEGIN

@interface CAShapeLayer (Extension)
- (void)cornerRadius:(CGFloat)radius fillColor:(UIColor *)fillColor
borderWidth:(CGFloat)borderWidth
         borderColor:(UIColor *_Nullable)borderColor;

- (void)cornerRadius:(CGFloat)radius fillColor:(UIColor *)fillColor corners:(UIRectCorner)corners;

- (void)cornerRadius:(CGFloat)radius fillColor:(UIColor *)fillColor
    corners:(UIRectCorner)corners
borderWidth:(CGFloat)borderWidth
borderColor:(UIColor *_Nullable)borderColor
      borderLineJoin:(CGLineJoin)borderLineJoin;

/**
 * @paramer bounds:bounds upper:是否是上三角
 */
+ (CAShapeLayer *)drawTriangle:(CGRect)bounds fillColor:(UIColor *)fillColor upper:(BOOL)upper;

/**
 绘制虚线 -----
 *  @paramer bounds:bounds
 * @paramer lineLength ： 线长
 * @paramer lineSpacing : 间隔
 * @paramer lineColor : 线的颜色
 */

+ (CAShapeLayer *)drawDashLine:(CGRect)bounds lineWidth:(CGFloat)lineWidth lineLength:(CGFloat)lineLength lineSpacing:(CGFloat)lineSpacing lineColor:(UIColor *)lineColor;

/**
 绘制虚线框  ----
          |    |
           ----
 * @paramer bounds:bounds
 * @paramer lineWidth: 线粗细
 * @paramer lineLength ： 线长
 * @paramer lineSpacing : 间隔
 * @paramer lineColor : 线的颜色
 */
+ (CAShapeLayer *)drawDashLineBox:(CGRect)bounds lineWidth:(CGFloat)lineWidth lineLength:(CGFloat)lineLength lineSpacing:(CGFloat)lineSpacing lineColor:(UIColor *)lineColor;
@end

NS_ASSUME_NONNULL_END
